package com.bzsys.util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;

public class StringToDate {
	
	public final static java.sql.Date string2Date(String dateString) throws java.lang.Exception{
		DateFormat dateFormat;
		dateFormat = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss", Locale.ENGLISH);
		dateFormat.setLenient(false);
		
		java.util.Date timeDate = dateFormat.parse(dateString);
		
		java.sql.Date dateTime = new java.sql.Date(timeDate.getTime());
		
		return dateTime;
		
	}

}
